//
//  statisticalViewController.m
//  PlayDAs
//
//  Created by 周莹 on 15/12/17.
//  Copyright © 2015年 周莹. All rights reserved.
//

#import "statisticalViewController.h"
#import "OneTableViewCell.h"
#import "StaticMOdel.h"
@interface statisticalViewController ()<UITableViewDelegate,UITableViewDataSource>

@end

@implementation statisticalViewController


//-(UITableView *)mainTableView{
//    if (!_mainTableView) {
//        _mainTableView = [[UITableView alloc] init];
//    }
//    return _mainTableView;
//}

- (void)viewDidLoad {
    [super viewDidLoad];
    self.mainTableView.dataSource = self;
    self.mainTableView.delegate = self;
// 注册cell
   // [self.mainTableView  registerClass:[OneTableViewCell  class] forCellReuseIdentifier:@"cell"];
    [self.mainTableView registerNib:[UINib nibWithNibName:@"OneTableViewCell" bundle:nil] forCellReuseIdentifier:@"cell"];
    
    
    // Do any additional setup after loading the view from its nib.
}


//分区
-(NSInteger)numberOfSectionsInTableView:(UITableView *)tableView{
    return 3;
}

//每组cell数目
-(NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section{
    if (section == 0) {
        return 2;
    } else if (section == 1) {
        return 1;
        
    } else {
        
        return 2;
    }
}


//cell
-(UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath{
//    StaticMOdel  *model = self.dataArray[indexPath.item];

    
    OneTableViewCell *cell = [tableView  dequeueReusableCellWithIdentifier:@"cell" forIndexPath:indexPath];
    
    if (indexPath.section == 0 && indexPath.row == 0) {
        cell. FirstLable.text = @"智商评分";
    } else if (indexPath.section == 0 && indexPath.row == 1) {
        cell.FirstLable.text = @"智商排名";
    } else if (indexPath.section == 1 && indexPath.row == 0) {
        cell.FirstLable.text = @"累积奖金";
    }else if (indexPath.section == 2 && indexPath.row == 0) {
        cell.FirstLable.text = @"累积答题";
    
    }else if (indexPath.section == 2 && indexPath.row == 1) {
        cell.FirstLable.text = @"累积拼图";
    
   
}

    
 return cell;





}









- (void)didReceiveMemoryWarning {
    [super didReceiveMemoryWarning];
    // Dispose of any resources that can be recreated.
}

/*
#pragma mark - Navigation

// In a storyboard-based application, you will often want to do a little preparation before navigation
- (void)prepareForSegue:(UIStoryboardSegue *)segue sender:(id)sender {
    // Get the new view controller using [segue destinationViewController].
    // Pass the selected object to the new view controller.
}
*/

@end
